<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition  xmlns="http://www.w3.org/1999/xhtml"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:rich="http://richfaces.org/rich"
    xmlns:c="http://java.sun.com/jstl/core"
    xmlns:a4j="http://richfaces.org/a4j" template="layouts/layout.xhtml">
   <ui:define name="content">
<h:form>
<rich:panel>	
    <rich:dataTable styleClass="configurationTable" value="#{wsStockManageController.model.currentStockDTOs}" rowClasses="odd-row, even-row" 
    var="currentStock" iterationStatusVar="it" id="table" rows="20">
            <rich:column>
                <f:facet name="header">#</f:facet>
                #{it.index}
            </rich:column>
            <rich:column>
                <f:facet name="header">Item Name </f:facet>
                <h:outputText value="#{currentStock.itemDTO.itemName}" />
            </rich:column>
            <rich:column>
                <f:facet name="header">Quantity</f:facet>
                <h:outputText value="#{currentStock.itemDTO.quantity}" />
            </rich:column>
            <rich:column>
                <f:facet name="header">Unit Name</f:facet>
                <h:outputText value="#{currentStock.itemDTO.unitDTO.unitName}" />
            </rich:column>
            <rich:column>
                <f:facet name="header">Price</f:facet>
                <h:outputText value="#{currentStock.itemDTO.unitPrice}" />
            </rich:column>
            <rich:column>
                <f:facet name="header">Stock On</f:facet>
                <h:outputText value="#{currentStock.itemDTO.createdOn}" />
            </rich:column>
            
          
        </rich:dataTable>
                </rich:panel>
</h:form>
<rich:jQuery selector=".configurationTable tr:odd" query="addClass('odd-row')" />
    <rich:jQuery selector=".configurationTable tr:even" query="addClass('even-row')" />
    <rich:jQuery selector=".configurationTable tr" event="mouseover" query="jQuery(this).addClass('active-row')" />
    <rich:jQuery selector=".configurationTable tr" event="mouseout" query="jQuery(this).removeClass('active-row')" />
</ui:define>


</ui:composition>
